<!DOCTYPE html>
<title>Tests that the media player does not include authorization information.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="../../media-resources/media-file.js"></script>
<body>
<video>
    <source></source>
</video>
<script>
async_test(function(t) {
    var frame = document.createElement('iframe');
    frame.onload = t.step_func(function() {
        var video = document.querySelector('video');
        video.onerror = t.unreached_func();
        video.oncanplay = t.step_func_done();

        var movie = 'test.ogv';
        var type = mimeTypeForExtension(movie.split('.').pop());
        source = document.querySelector('source');
        source.type = type;
        source.src = 'http://user:pass@127.0.0.1:8080/media/resources/video-check-userpass.php?name=' + movie + '&type=' + type;
        video.load();
    });

    frame.src = 'data:text/html,<b>test</b>';
    document.body.appendChild(frame);
});
</script>